home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-14 | 1.5 KB | 43 lines | [TEXT/CWIE] |
- // ===========================================================================
- // File: LColorSwatch.h
- // Version: 1.0 - Feb 08, 1995
- // Author: Mike Shields (mshields@inconnect.com)
- //
- // Copyright ©1996 Mike Shields. All rights reserved.
- // ===========================================================================
- // LColorSwatch.h <- double-click + Command-D to see class declaration
- //
- // Originally based on the code by Brian Hill <lorax@msn.fullfeed.com>
-
- #pragma once
- #include <LControl.h>
-
- class LColorSwatch : public LControl
- {
- public:
- enum { class_ID = 'Clor' };
- static LColorSwatch*
- CreateFromStream(LStream* inStream);
- LColorSwatch();
- LColorSwatch(const LColorSwatch& inOriginal);
- LColorSwatch(const SPaneInfo &inPaneInfo, MessageT inValueMessage,
- Int32 inValue, Int32 inMinValue, Int32 inMaxValue,
- ConstStringPtr inString, RGBColor& inColor);
- LColorSwatch(LStream* inStream);
- virtual ~LColorSwatch();
- virtual void GetColor(RGBColor& outColor);
- virtual void SetColor(RGBColor& inColor);
- virtual StringPtr GetDescriptor(Str255 outDescriptor) const;
- virtual void SetDescriptor(ConstStringPtr inDescriptor);
-
- protected:
- virtual void HotSpotAction(Int16 inHotSpot, Boolean inCurrInside,
- Boolean inPrevInside);
- virtual void HotSpotResult(Int16 inHotSpot);
- virtual Boolean PointInHotSpot(Point inPoint, Int16 inHotSpot);
- virtual void DrawSelf();
-
- RGBColor mColor;
- LStr255 mPrompt;
- };
-